package com.recsmile.sgs.client.card.equips;

import com.recsmile.sgs.client.card.Card;
import com.recsmile.sgs.client.card.basic.Attack;
import com.recsmile.sgs.client.card.instant.ArrowSalvo;
import com.recsmile.sgs.client.card.instant.BarbarianInvasion;
import com.recsmile.sgs.client.entity.Damage;
import com.recsmile.sgs.client.entity.Damage.Element;

public class RattanArmor extends Shield {

	private static final long serialVersionUID = -4377220192386216241L;

	public RattanArmor(int num, Suit suit, int id) {
		super(num, suit, id);
	}

	@Override
	public String getName() {
		return "Rattan Armor";
	}

	@Override
	public boolean mustReactTo(Card card) {
		if (card instanceof ArrowSalvo || card instanceof BarbarianInvasion) {
			return false;
		} else if (card instanceof Attack && ((Attack) card).getElement() == Element.NORMAL) {
			return false;
		} else {
			return true;
		}
	}

	@Override
	public void modifyDamage(Damage damage) {
		if (damage.getElement() == Element.FIRE) {
			damage.setAmount(damage.getAmount() + 1);
		}
	}

}